package com.kucowka.struts.actions.chat.history;

import java.io.PrintWriter;

public class StringSaver {

	private PrintWriter pw;

	public StringSaver(PrintWriter pw) {
		this.pw = pw;
	}

	public boolean writeString(String text) {

		if (text == null) {
			throw new NullPointerException();
		}

		pw.println(text);

		return !pw.checkError();
	}
}
